#include <stdio.h>
#include <math.h>

double funcos( double e, double x );

int main()
{    
    double e, x;

    scanf("%lf,%lf", &e, &x);
    printf("%.6f", funcos(e, x));
    
    return 0;
}

double funcos( double e, double x ){
    double sum = 0.0; 
    double term = 1.0; 
    int n = 0; 
    while (fabs(term)>=e){
        sum += term;
        n++;
        term = -term * x * x / ( (2  * n) * (2 * n - 1) );
    }
    sum += term;
    return sum;

}